/*
 * ThreadSafeMap.h
 *
 *  Created on: Nov 16, 2011
 *      Author: gonzalo
 */

#ifndef THREADSAFEMAP_H_
#define THREADSAFEMAP_H_

#include <list>
#include "../ConditionVariable/MutexEncapsulation.h"
#include "../Constantes.h"

class ThreadSafeList {
public:
	ThreadSafeList();
	virtual ~ThreadSafeList();

	void insert(std::pair<void*, TypeNotifier> pair);
	bool empty();
	std::pair<void*, TypeNotifier> pop();

private:
	MutexEncapsulation mutex;
	std::list< std::pair<void*, TypeNotifier> > list;
};

#endif /* THREADSAFEMAP_H_ */
